package com.atguigu.elsdemo.controller;

import com.atguigu.elsdemo.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.net.UnknownServiceException;

@Controller
public class helloController {
    @GetMapping("test")
    public String test(Model model){

        model.addAttribute("msg","hello<font style='color:red;'>Thymeleaf</font>");
        model.addAttribute("user",new User("网阿布",18,new User("老八",88,null)));
        return "hello";
    }
}
